/**
 * Created by LangK on 2016/12/20.
 */
import Vue from 'vue'
require("../../config/config")
import getLogin from "../assets/content/login"
import admin from "../assets/content/admin"
import user from "../assets/content/user"
import goods from "../assets/content/goods"
import notice from "../assets/content/notice"
import order from "../assets/content/order"
import store from "../assets/content/store"
import loging from "../assets/content/log"
import type from "../assets/content/type"
import homeUrl from "../assets/content/homeUrl"
import message from "../assets/content/message"
import cash from "../assets/content/cash"
import act from "../assets/content/activity"
export default {
  // 登录
  login({ }, postdata) {
    return getLogin(global.loginpath, postdata)
  },
  // 注册
  register({ }, postdata) {
    return admin.adminRegister(global.registerpath, postdata)
  },
  // 获取管理员列表
  getAdmins({ }, postdata) {
    // console.log(postdata, global.listpath)
    return admin.adminList(global.listpath, postdata)
  },
  // 删除管理员
  deleteAdmin({ }, postdata) {
    // console.log(postdata, global.deletepath)
    return admin.adminDel(global.deletepath, postdata)
  },
  // 修改密码
  upwdAdmin({ }, postdata) {
    // console.log(postdata, global.upwdpath)
    return admin.adminUpwd(global.upwdpath, postdata)
  },
  // 重置密码
  resetAdmin({ }, postdata) {
    // console.log(postdata, global.resetpath)
    return admin.adminReset(global.resetpath, postdata)
  },
  // 获取所有用户
  getUserAll({ }, postdata) {
    // console.log(postdata, global.findAllpath)
    return user.userList(global.findAllpath, postdata)
  },
  // 获取单个用户详情
  getUserOne({ }, postdata) {
    // console.log(postdata, global.findOnepath)
    return user.userOne(global.findOnepath, postdata)
  },
  // 获取所有套餐
  getGoodAll({}, postdata) {
    // console.log(postdata, global.goodsAllpath)
    return goods.goodsList(global.goodsAllpath, postdata)
  },
  // 添加套餐
  getGoodAdd({}, postdata) {
    // console.log(postdata, global.savepath)
    return goods.goodsAdd(global.savepath, postdata)
  },
  // 删除套餐
  getGoodDel({}, postdata) {
    // console.log(postdata, global.goodsDelpath)
    return goods.goodsDel(global.goodsDelpath, postdata)
  },

  // 获取所有通知
  getNoticeAll({}, postdata) {
    // console.log(postdata, global.noticeAllpath)
    return notice.noticeList(global.noticeAllpath, postdata)
  },
  // 添加轮播
  getNoticeAdd({}, postdata) {
    // console.log(postdata, global.noticeAddpath)
    return notice.noticeAdd(global.noticeAddpath, postdata)
  },
  // 添加轮播中图片
  getNoticeFileAdd({}, postdata) {
    // console.log(postdata, global.noticeFileAddpath)
    return notice.noticeFileAdd(global.noticeFileAddpath, postdata)
  },
  // 删除轮播
  getNoticeDel({}, postdata) {
    // console.log(postdata, global.noticeDelpath)
    return notice.noticeDel(global.noticeDelpath, postdata)
  },

  // 充值订单列表
  getOrderAll({}, postdata) {
    // console.log(postdata, global.orderAllpath)
    return order.orderList(global.orderAllpath, postdata)
  },
  // 获取所有商户
  getStoreAll({}, postdata) {
    // console.log(postdata, global.storeAllpath)
    return store.storeList(global.storeAllpath, postdata)
  },
  // 添加商户
  getStoreAdd({}, postdata) {
    // console.log(postdata, global.storeAddpath)
    return store.storeAdd(global.storeAddpath, postdata)
  },
  // 添加商户
  getStorePaymentAll({}, postdata) {
    // console.log(postdata, global.storefindPayment)
    return store.storePayMent(global.storefindPayment, postdata)
  },
  // 删除商户
  getStoreDel({}, postdata) {
    // console.log(postdata, global.storeDelpath)
    return store.storeDel(global.storeDelpath, postdata)
  },
  // 搜索商户
  getStoreSeek({}, postdata) {
    // console.log(postdata, global.storeFindpath)
    return store.storeSeek(global.storeFindpath, postdata)
  },
  // 商户详情
  getStoreDetails({}, postdata) {
    // console.log(postdata, global.storeOnepath)
    return store.storeDetails(global.storeOnepath, postdata)
  },
  // 日志详情
  getLogAll({}, postdata) {
    // console.log(postdata, global.storeLogPath)
    return loging.logList(global.storeLogPath, postdata)
  },
  // 类别列表
  getTypeAll({}, postdata) {
    // console.log(postdata, global.typeAllpath)
    return type.typeList(global.typeAllpath, postdata)
  },
  // 添加类别
  getTypeAdd({}, postdata) {
    // console.log(postdata, global.typeAddpath)
    return type.typeAdd(global.typeAddpath, postdata)
  },
  // 排序类别
  getTypeSort({}, postdata) {
    // console.log(postdata, global.typeUpdatepath)
    return type.typeSort(global.typeUpdatepath, postdata)
  },
  // 类别删除
  getTypeDel({}, postdata) {
    // console.log(postdata, global.typeDelpath)
    return type.typeDel(global.typeDelpath, postdata)
  },
  // 获取主页Url
  getUrlPath({}, postdata) {
    // console.log(postdata, global.aboutUrlpath)
    return homeUrl.urlPath(global.aboutUrlpath, postdata)
  },
  // 修改主页Url
  getUrlUpdatePath({}, postdata) {
    // console.log(postdata, global.aboutUrlUpdatepath)
    return homeUrl.urlUpdatePath(global.aboutUrlUpdatepath, postdata)
  },
  // 添加通知
  getMessageAdd({}, postdata) {
    // console.log(postdata, global.msgSavepath)
    return message.msgAdd(global.msgSavepath, postdata)
  },
  // 获取所有通知
  getMessageAll({}, postdata) {
    // console.log(postdata, global.msgAllpath)
    return message.msgList(global.msgAllpath, postdata)
  },
  // 删除通知
  getMessageDel({}, postdata) {
    // console.log(postdata, global.msgDelpath)
    return message.msgDel(global.msgDelpath, postdata)
  },
  // 提现列表
  getCashList({}, postdata) {
    return cash.cashList(global.cashAllpath, postdata)
  },
  // 同意提现
  getCashAccept({}, postdata) {

    return cash.cashAcce(global.cashAcceptpath, postdata)
  },
  // 拒绝提现
  getCashRefused({}, postdata) {
    return cash.cashRef(global.cashRefusedpath, postdata)
  },
  getAddHotAct({}, postdata) {
    return act.actHot(global.addHotpath, postdata)
  }
}
